<table width="100%" border="1">
  <th>name</th><th>categories</th><th>revisions</th><th>created</th><th>last revised</th><th>size (words)</th><th>actions</th>
<?php
foreach($db->pages->page as $page) {
  echo "<tr>
  <td><a href='?show=".$page['title']."'>".$page['title']."</a></td>
  <td>";
  echo listCategories($page);
  echo "</td>
  <td>".count($page->revision)."</td>
  <td>".date("n/j/Y - g:ia",$page->revision[0]['time']+0)."</td>
  <td>".date("n/j/Y - g:ia",$page->revision[count($page->revision)-1]['time']+0)."</td>
  <td>".count(split(" ",$page->revision[count($page['revision'])]))."</td>
  <td><a href='?edit=".$page['title']."'>edit</a></td>
  </tr>";
}
?>
</table>